home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ami48.exe / OEMSETUP.INF < prev    next >
INI File  |  1993-10-21  |  22KB  |  701 lines

  1. [UiVars]
  2.     STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  3. ;-----------------------------------------------------------------------
  4. ; OPTION TYPE
  5. ; -----------
  6. ; This identifies the Option type we are dealing with.    The different
  7. ; possible types are:
  8. ;
  9. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  10. ;-----------------------------------------------------------------------
  11.  
  12. [Identification]
  13.     OptionType = SCSI
  14.  
  15. ;-----------------------------------------------------------------------
  16. ; LANGUAGES SUPPORTED
  17. ; -------------------
  18. ;
  19. ; The languages supported by the INF, For every language supported
  20. ; we need to have a separate text section for every displayable text
  21. ; section.
  22. ;
  23. ;-----------------------------------------------------------------------
  24.  
  25. [LanguagesSupported]
  26.     ENG
  27.  
  28.  
  29. ;-----------------------------------------------------------------------
  30. ; OPTION LIST
  31. ; -----------
  32. ; This section lists the Option key names.  These keys are locale
  33. ; independent and used to represent the option in a locale independent
  34. ; manner.
  35. ;
  36. ;-----------------------------------------------------------------------
  37.  
  38. [Options]
  39.     "AMI0NT"     = AMI0NT
  40.     "AMI0NTA"     = AMI0NTa
  41.     "AHA154X"     = aha154x
  42.     "AHA154XA"     = aha154xa
  43.     "BUSLOGIC"     = buslogic
  44.     "BUSLGICA"     = buslgica
  45.  
  46. ;-----------------------------------------------------------------------
  47. ; OPTION TEXT SECTION
  48. ; -------------------
  49. ; These are text strings used to identify the option to the user.  There
  50. ; are separate sections for each language supported.  The format of the
  51. ; section name is "OptionsText" concatenated with the Language represented
  52. ; by the section.
  53. ;
  54. ;-----------------------------------------------------------------------
  55.  
  56. [OptionsTextENG]
  57.     "AMI0NT"    = "AMIscsi Series 15/44/441/48/70 as primary boot device"
  58.     "AMI0NTA"    = "AMIscsi Series 15/44/441/48/70 not as primary boot device"
  59.     "AHA154X"     = "Adaptec 154x/164x as primary boot device"
  60.     "AHA154XA"     = "Adaptec 154x/164x not as primary boot device"
  61.     "BUSLOGIC"     = "BusLogic Family as primary boot device"
  62.     "BUSLGICA"     = "BusLogic Family not as primary boot device"
  63.  
  64.  
  65. ;-----------------------------------------------------------------------------------------
  66. ; SCSI MINIPORT DRIVERS:
  67. ;
  68. ; Order of the information:
  69. ;
  70. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  71. ;
  72. ;-----------------------------------------------------------------------------------------
  73.  
  74. [MiniportDrivers]
  75.     AMI0NT  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL, 99, %SystemRoot%\System32\IoLogMsg.dll , 7
  76.     AMI0NTa = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL, 99, %SystemRoot%\System32\IoLogMsg.dll , 7
  77.     aha154x  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,    3, %SystemRoot%\System32\IoLogMsg.dll , 7
  78.     aha154xa = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,    3, %SystemRoot%\System32\IoLogMsg.dll , 7
  79.     buslogic = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL, 17, %SystemRoot%\System32\IoLogMsg.dll , 7
  80.     buslgica = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL, 17, %SystemRoot%\System32\IoLogMsg.dll , 7
  81.  
  82. ;---------------------------------------------------------------------------
  83. ; 1. Identify
  84. ;
  85. ; DESCRIPTION:     To verify that this INF deals with the same type of options
  86. ;         as we are choosing currently.
  87. ;
  88. ; INPUT:     None
  89. ;
  90. ; OUTPUT:     $($R0): STATUS: STATUS_SUCCESSFUL
  91. ;         $($R1): Option Type (COMPUTER ...)
  92. ;         $($R2): Diskette description
  93. ;---------------------------------------------------------------------------
  94.  
  95. [Identify]
  96.     ;
  97.     ;
  98.     read-syms Identification
  99.  
  100.     set Status       = STATUS_SUCCESSFUL
  101.     set Identifier = $(OptionType)
  102.     set Media       = #("Source Media Descriptions", 1, 1)
  103.  
  104.     Return $(Status) $(Identifier) $(Media)
  105.  
  106.  
  107.  
  108. ;------------------------------------------------------------------------
  109. ; 2. ReturnOptions:
  110. ;
  111. ; DESCRIPTION:     To return the option list supported by this INF and the
  112. ;         localised text list representing the options.
  113. ;
  114. ;
  115. ; INPUT:     $($0):  Language used. ( ENG | FRN | ... )
  116. ;
  117. ; OUTPUT:     $($R0): STATUS: STATUS_SUCCESSFUL |
  118. ;                 STATUS_NOLANGUAGE
  119. ;                 STATUS_FAILED
  120. ;
  121. ;         $($R1): Option List
  122. ;         $($R2): Option Text List
  123. ;------------------------------------------------------------------------
  124.  
  125. [ReturnOptions]
  126.     ;
  127.     ;
  128.     set Status          = STATUS_FAILED
  129.     set OptionList     = {}
  130.     set OptionTextList = {}
  131.  
  132.     ;
  133.     ; Check if the language requested is supported
  134.     ;
  135.     set LanguageList = ^(LanguagesSupported, 1)
  136.     Ifcontains(i) $($0) in $(LanguageList)
  137.     goto returnoptions
  138.     else
  139.     set Status = STATUS_NOLANGUAGE
  140.     goto finish_ReturnOptions
  141.     endif
  142.  
  143.     ;
  144.     ; form a list of all the options and another of the text representing
  145.     ;
  146.  
  147. returnoptions = +
  148.     set OptionList     = ^(Options, 0)
  149.     set OptionTextList = ^(OptionsText$($0), 1)
  150.     set Status           = STATUS_SUCCESSFUL
  151.  
  152. finish_ReturnOptions = +
  153.     Return $(Status) $(OptionList) $(OptionTextList)
  154.  
  155.  
  156. ;
  157. ; 3. InstallOption:
  158. ;
  159. ; FUNCTION:  To copy files representing Options
  160. ;         To configure the installed option
  161. ;         To update the registry for the installed option
  162. ;
  163. ; INPUT:     $($0):  Language to use
  164. ;         $($1):  OptionID to install
  165. ;         $($2):  SourceDirectory
  166. ;         $($3):  AddCopy  (YES | NO)
  167. ;         $($4):  DoCopy   (YES | NO)
  168. ;         $($5):  DoConfig (YES | NO)
  169. ;
  170. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  171. ;                 STATUS_NOLANGUAGE |
  172. ;                 STATUS_USERCANCEL |
  173. ;                 STATUS_FAILED
  174. ;
  175.  
  176. [InstallOption]
  177.  
  178.     ;
  179.     ; Set default values for
  180.     ;
  181.     set Status = STATUS_FAILED
  182.     set DrivesToFree = {}
  183.  
  184.     ;
  185.     ; extract parameters
  186.     ;
  187.     set Option     = $($1)
  188.     set SrcDir     = $($2)
  189.     set AddCopy  = $($3)
  190.     set DoCopy     = $($4)
  191.     set DoConfig = $($5)
  192.  
  193.     ;
  194.     ; Check if the language requested is supported
  195.     ;
  196.     set LanguageList = ^(LanguagesSupported, 1)
  197.     Ifcontains(i) $($0) in $(LanguageList)
  198.     else
  199.     set Status = STATUS_NOLANGUAGE
  200.     goto finish_InstallOption
  201.     endif
  202.     read-syms Strings$($0)
  203.  
  204.     ;
  205.     ; check to see if Option is supported.
  206.     ;
  207.  
  208.     set OptionList = ^(Options, 0)
  209.     ifcontains $(Option) in $(OptionList)
  210.     else
  211.     Debug-Output "SCSI.INF: SCSI option is not supported."
  212.     goto finish_InstallOption
  213.     endif
  214.     set OptionList = ""
  215.  
  216.     ;
  217.     ; Option has been defined already
  218.     ;
  219.  
  220.     set MiniportDriver     =   #(Options,        $(Option),       1)
  221.     set Type         = $(#(MiniportDrivers, $(MiniportDriver), 1))
  222.     set Group         =   #(MiniportDrivers, $(MiniportDriver), 2)
  223.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  224.     set Tag         =   #(MiniportDrivers, $(MiniportDriver), 4)
  225.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  226.     set TypesSupported     =   #(MiniportDrivers, $(MiniportDriver), 6)
  227.  
  228.     set Start         =   $(!SERVICE_BOOT_START)
  229.  
  230. ;   +++ Other driver has this line
  231. ;    set Start          =   $(!SERVICE_SYSTEM_START)
  232. ;   followed by this code
  233. ;    shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  234. ;    ifint $($ShellCode) == $(!SHELL_CODE_OK)
  235. ;     ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  236. ;         ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  237. ;         set Start = $(!SERVICE_BOOT_START)
  238. ;         endif
  239. ;     endif
  240. ;    endif
  241.  
  242. installtheoption = +
  243.  
  244.     ;
  245.     ; Code to add files to copy list
  246.     ;
  247.  
  248.     ifstr(i) $(AddCopy) == "YES"
  249.     set DoActualCopy = NO
  250.     set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  251.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  252.     ifstr(i) $(STATUS) == NO
  253.         set DoActualCopy = YES
  254.     endif
  255.  
  256.     ifstr(i) $(DoActualCopy) == NO
  257.         shell "subroutn.inf" DriversExist $($0) $(String1)
  258.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  259.         Debug-Output "SCSI.INF: shelling DriversExist failed"
  260.         goto finish_InstallOption
  261.         endif
  262.  
  263.         ifstr(i) $($R0) == STATUS_CURRENT
  264.         else-ifstr(i) $($R0) == STATUS_NEW
  265.         set DoActualCopy = YES
  266.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  267.         Debug-Output "SCSI.INF: User cancelled SCSI installation"
  268.         goto finish_InstallOption
  269.         else
  270.         Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  271.         goto finish_InstallOption
  272.         endif
  273.     endif
  274.  
  275.     ifstr(i) $(DoActualCopy) == YES
  276.  
  277.         shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  278.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  279.         Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  280.         goto finish_InstallOption
  281.         endif
  282.  
  283.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  284.         set SrcDir = $($R1)
  285.         ifstr(i) $($R2) != ""
  286.             set DrivesToFree = >($(DrivesToFree), $($R2))
  287.         endif
  288.         else
  289.         Debug-Output "SCSI.INF: User cancelled asking source."
  290.         goto finish_InstallOption
  291.         endif
  292.  
  293.         install Install-AddCopyOption
  294.         ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  295.         Debug-Output "Adding SCSI files to copy list failed"
  296.         goto finish_InstallOption
  297.         endif
  298.     else
  299.         set DoCopy = NO
  300.     endif
  301.  
  302.     endif
  303.  
  304.     ifstr(i) $(DoCopy) == "YES"
  305.     read-syms ProgressCopy$($0)
  306.     install Install-DoCopyOption
  307.     ;
  308.     ; Copy the driver to root as NTBOOTDD.SYS (if this option selected).
  309.     ;
  310.     ifstr $(MiniportDriver) == "AMI0NT"
  311.       RunProgram ExitCode "" "" $(!STF_WINDOWSSYSPATH)"\command.com" /c $(SrcDir)copyami.bat
  312.     endif
  313.     ifstr $(MiniportDriver) == "aha154x"
  314.       RunProgram ExitCode "" "" $(!STF_WINDOWSSYSPATH)"\command.com" /c $(SrcDir)copyaha.bat
  315.     endif
  316.     ifstr $(MiniportDriver) == "buslogic"
  317.       RunProgram ExitCode "" "" $(!STF_WINDOWSSYSPATH)"\command.com" /c $(SrcDir)copybus.bat
  318.     endif
  319.  
  320.     ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  321.         Debug-Output "Copying files failed"
  322.         goto finish_InstallOption
  323.     else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  324.         set Status = STATUS_USERCANCEL
  325.         goto finish_InstallOption
  326.     endif
  327.     endif
  328.  
  329.     ifstr(i) $(DoConfig) == "YES"
  330.     ;
  331.     ; first run a privilege check on modifying the setup node
  332.     ;
  333.  
  334.     shell "registry.inf" CheckSetupModify
  335.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  336.         goto finish_InstallOption
  337.     endif
  338.  
  339.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  340.         goto finish_InstallOption
  341.     endif
  342.  
  343.     ;
  344.     ; then make a new SCSI entry, the entry is created automatically
  345.     ; enabled
  346.     ;
  347.  
  348.     set ServiceNode   = $(MiniportDriver)
  349.     set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  350.  
  351.     set ServicesValues   = { +
  352.         {Type,         0, $(!REG_VT_DWORD),      $(Type)           }, +
  353.         {Start,         0, $(!REG_VT_DWORD),      $(Start)           }, +
  354.         {Group,         0, $(!REG_VT_SZ),      $(Group)           }, +
  355.         {ErrorControl,     0, $(!REG_VT_DWORD),      $(ErrorControl)       }, +
  356.         {Tag,         0, $(!REG_VT_DWORD),      $(Tag)           }, +
  357.         {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)       }  +
  358.         }
  359.     set ParametersValues = ""
  360.     set DeviceValues     = {}
  361.     set EventLogValues   = { +
  362.         {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  363.         {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)    }  +
  364.         }
  365.  
  366.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)        +
  367.                         $(ServicesValues)   +
  368.                         $(ParametersValues) +
  369.                         $(DeviceValues)     +
  370.                         $(EventLogValues)   +
  371.                         Parameters
  372.  
  373.  
  374.  
  375.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  376.         Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  377.         goto finish_InstallOption
  378.     endif
  379.  
  380.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  381.         Debug-Output "MakeServicesEntry failed for SCSI"
  382.         goto finish_InstallOption
  383.     endif
  384.     ;
  385.     ; Disable replaced drivers
  386.     ;
  387.     ifstr $(MiniportDriver) == "AMI0NT"
  388.         OpenRegKey $(!REG_H_LOCAL) "" +
  389.          "system\currentcontrolset\services\aha154x" $(!REG_KEY_SET_VALUE) MyHandle
  390.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  391.         SetRegValue $(MyHandle) $(RegValue)
  392.         CloseRegKey $(MyHandle)
  393.         OpenRegKey $(!REG_H_LOCAL) "" +
  394.          "system\currentcontrolset\services\buslogic" $(!REG_KEY_SET_VALUE) MyHandle
  395.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  396.         SetRegValue $(MyHandle) $(RegValue)
  397.         CloseRegKey $(MyHandle)
  398.     endif
  399.  
  400.     ifstr $(MiniportDriver) == "AMI0NTa"
  401.         OpenRegKey $(!REG_H_LOCAL) "" +
  402.          "system\currentcontrolset\services\aha154x" $(!REG_KEY_SET_VALUE) MyHandle
  403.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  404.         SetRegValue $(MyHandle) $(RegValue)
  405.         CloseRegKey $(MyHandle)
  406.         OpenRegKey $(!REG_H_LOCAL) "" +
  407.          "system\currentcontrolset\services\buslogic" $(!REG_KEY_SET_VALUE) MyHandle
  408.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  409.         SetRegValue $(MyHandle) $(RegValue)
  410.         CloseRegKey $(MyHandle)
  411.     endif
  412.  
  413.     ifstr $(MiniportDriver) == "aha154x"
  414.         OpenRegKey $(!REG_H_LOCAL) "" +
  415.          "system\currentcontrolset\services\AMI0NT" $(!REG_KEY_SET_VALUE) MyHandle
  416.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  417.         SetRegValue $(MyHandle) $(RegValue)
  418.         CloseRegKey $(MyHandle)
  419.         OpenRegKey $(!REG_H_LOCAL) "" +
  420.          "system\currentcontrolset\services\buslogic" $(!REG_KEY_SET_VALUE) MyHandle
  421.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  422.         SetRegValue $(MyHandle) $(RegValue)
  423.         CloseRegKey $(MyHandle)
  424.     endif
  425.  
  426.     ifstr $(MiniportDriver) == "aha154xa"
  427.         OpenRegKey $(!REG_H_LOCAL) "" +
  428.          "system\currentcontrolset\services\AMI0NT" $(!REG_KEY_SET_VALUE) MyHandle
  429.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  430.         SetRegValue $(MyHandle) $(RegValue)
  431.         CloseRegKey $(MyHandle)
  432.         OpenRegKey $(!REG_H_LOCAL) "" +
  433.          "system\currentcontrolset\services\buslogic" $(!REG_KEY_SET_VALUE) MyHandle
  434.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  435.         SetRegValue $(MyHandle) $(RegValue)
  436.         CloseRegKey $(MyHandle)
  437.     endif
  438.  
  439.     ifstr $(MiniportDriver) == "buslogic"
  440.         OpenRegKey $(!REG_H_LOCAL) "" +
  441.          "system\currentcontrolset\services\aha154x" $(!REG_KEY_SET_VALUE) MyHandle
  442.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  443.         SetRegValue $(MyHandle) $(RegValue)
  444.         CloseRegKey $(MyHandle)
  445.         OpenRegKey $(!REG_H_LOCAL) "" +
  446.          "system\currentcontrolset\services\AMI0NT" $(!REG_KEY_SET_VALUE) MyHandle
  447.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  448.         SetRegValue $(MyHandle) $(RegValue)
  449.         CloseRegKey $(MyHandle)
  450.     endif
  451.  
  452.     ifstr $(MiniportDriver) == "buslgica"
  453.         OpenRegKey $(!REG_H_LOCAL) "" +
  454.          "system\currentcontrolset\services\aha154x" $(!REG_KEY_SET_VALUE) MyHandle
  455.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  456.         SetRegValue $(MyHandle) $(RegValue)
  457.         CloseRegKey $(MyHandle)
  458.         OpenRegKey $(!REG_H_LOCAL) "" +
  459.          "system\currentcontrolset\services\AMI0NT" $(!REG_KEY_SET_VALUE) MyHandle
  460.         set RegValue = {"Start", 0, $(!REG_VT_DWORD), 4}
  461.         SetRegValue $(MyHandle) $(RegValue)
  462.         CloseRegKey $(MyHandle)
  463.     endif
  464.  
  465.     endif
  466.  
  467.     set Status = STATUS_SUCCESSFUL
  468. finish_InstallOption = +
  469.     ForListDo $(DrivesToFree)
  470.     LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  471.     EndForListDo
  472.  
  473.     Return $(Status)
  474.  
  475.  
  476. [Install-AddCopyOption]
  477.  
  478.     ;
  479.     ; Add the files to the copy list
  480.     ;
  481.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers        +
  482.                   $(MiniportDriver)            +
  483.                   $(SrcDir)             +
  484.                   $(!STF_WINDOWSSYSPATH)\drivers
  485.  
  486.     exit
  487.  
  488.  
  489. [Install-DoCopyOption]
  490.  
  491.     ;
  492.     ; Copy files in the copy list
  493.     ;
  494.     CopyFilesInCopyList
  495.     exit
  496.  
  497. ;-------------------------------------------------------------------------
  498. ; 4. DeInstallOption:
  499. ;
  500. ; FUNCTION:  To remove files representing Option
  501. ;         To remove the registry entry corresponding to the Option
  502. ;
  503. ; INPUT:     $($0):  Language to use
  504. ;         $($1):  OptionID to install
  505. ;
  506. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  507. ;                 STATUS_NOLANGUAGE |
  508. ;                 STATUS_USERCANCEL |
  509. ;                 STATUS_FAILED
  510. ;-------------------------------------------------------------------------
  511. [DeInstallOption]
  512.     ;
  513.     ; Set default values for
  514.     ;
  515.     set Status     = STATUS_FAILED
  516.     ;
  517.     ; extract parameters
  518.     ;
  519.     set Option     = $($1)
  520.  
  521.     ;
  522.     ; Check if the language requested is supported
  523.     ;
  524.     set LanguageList = ^(LanguagesSupported, 1)
  525.     Ifcontains(i) $($0) in $(LanguageList)
  526.     else
  527.     set Status = STATUS_NOLANGUAGE
  528.     goto finish_DeInstallOption
  529.     endif
  530.     read-syms Strings$($0)
  531.  
  532.     ;
  533.     ; check to see if Option is supported.
  534.     ;
  535.  
  536.     set OptionList = ^(Options, 0)
  537.     ifcontains $(Option) in $(OptionList)
  538.     else
  539.     goto finish_DeInstallOption
  540.     endif
  541.     set OptionList = ""
  542.  
  543.     ;
  544.     ; fetch details about option
  545.     ;
  546.  
  547.     set MiniportDriver = #(Options, $(Option), 1)
  548.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  549.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  550.  
  551.     ;
  552.     ; check to see if file is installed
  553.     ; if not give success
  554.     ;
  555.  
  556.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  557.     ifstr(i) $(STATUS) == "NO"
  558.     set Status = STATUS_SUCCESSFUL
  559.     goto finish_DeInstallOption
  560.     endif
  561.  
  562.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  563.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  564.     ; this could happen if there is no start value or there is no
  565.     ; key, in which case the option is not installed
  566.     set Status = STATUS_SUCCESSFUL
  567.     goto finish_DeInstallOption
  568.     endif
  569.  
  570.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  571.     shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  572.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  573.         goto do_removal
  574.     endif
  575.     ifstr(i) $($R1) == "CANCEL"
  576.         goto finish_DeInstallOption
  577.     endif
  578.     endif
  579.  
  580. do_removal =+
  581.     ;
  582.     ; disable the registry entry
  583.     ;
  584.  
  585.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  586.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  587.     Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  588.     goto finish_DeInstallOption
  589.     endif
  590.  
  591.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  592.     Debug-Output "SCSI.INF: Failed to disable services entry"
  593.     goto finish_DeInstallOption
  594.     endif
  595.  
  596.     ;
  597.     ; we won't remove the file because we can only do so during the next boot.
  598.     ; if the user chooses to reinstall the same driver during this boot
  599.     ; he will still end up deleting the driver on next boot. if the file
  600.     ; should be deleted a warning should be put up saying that the user should
  601.     ; not try to reinstall the driver during this boot
  602.     ;
  603.     ;     AddFileToDeleteList $(FilePath)
  604.  
  605.     set Status = STATUS_SUCCESSFUL
  606.  
  607. finish_DeInstallOption =+
  608.     return $(Status)
  609.  
  610.  
  611. ;-------------------------------------------------------------------------
  612. ; 5. GetInstalledOptions:
  613. ;
  614. ; FUNCTION:  To find out the list of options which are installed
  615. ;
  616. ; INPUT:     $($0): Language to Use
  617. ;
  618. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  619. ;                 STATUS_FAILED
  620. ;
  621. ;         $($R1): List of options installed
  622. ;         $($R2): Option installed Text List
  623. ;-------------------------------------------------------------------------
  624. [GetInstalledOptions]
  625.     set Status = STATUS_FAILED
  626.     set InstalledOptions = {}
  627.     set InstalledOptionsText = {}
  628.  
  629.     ;
  630.     ; Check if the language requested is supported
  631.     ;
  632.     set LanguageList = ^(LanguagesSupported, 1)
  633.     Ifcontains(i) $($0) in $(LanguageList)
  634.     else
  635.     set Status = STATUS_NOLANGUAGE
  636.     goto finish_GetInstalledOptions
  637.     endif
  638.  
  639.     set OptionList = ^(Options, 0)
  640.     ForListDo $(OptionList)
  641.     set MiniportDriver = #(Options, $($), 1)
  642.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  643.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  644.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  645.     ifstr(i) $(STATUS) == "YES"
  646.         shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  647.         ifint $($ShellCode) == $(!SHELL_CODE_OK)
  648.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  649.             ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  650.  
  651.             set OptionText = #(OptionsText$($0), $($), 1)
  652.             set InstalledOptions     = >($(InstalledOptions), $($))
  653.             set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  654.  
  655.             endif
  656.         endif
  657.         endif
  658.     endif
  659.     EndForListDo
  660.     set Status = STATUS_SUCCESSFUL
  661. finish_GetInstalledOptions =+
  662.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  663.  
  664.  
  665. ;**************************************************************************
  666. ; PROGRESS GUAGE VARIABLES
  667. ;**************************************************************************
  668.  
  669. [ProgressCopyENG]
  670.     ProCaption     = "Windows NT Setup"
  671.     ProCancel     = "Cancel"
  672.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  673.            "to cancel copying files?"
  674.     ProCancelCap = "Setup Message"
  675.     ProText1     = "Copying:"
  676.     ProText2     = "To:"
  677.  
  678. [StringsENG]
  679.     String1 = "Selected SCSI Adapter"
  680.     String2 = "Please enter the full path to the SCSI "+
  681.           "Adapter files.  Then choose Continue."
  682.     String3 = "The SCSI Adapter has been marked as a boot device.  Removing "+
  683.           "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
  684.           "you want to remove the Adapter."
  685.  
  686. [Source Media Descriptions]
  687.     1  = "American Megatrends Inc. SCSI adapter disk"  , TAGFILE = AMIDISK1
  688.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  689.  
  690. ;[ProductType]
  691. ;STF_PRODUCT  = Winnt
  692. ;STF_PLATFORM = I386
  693.  
  694. [Files-ScsiMiniportDrivers]
  695. AMI0NT    = 1,AMI0NT.sys , SIZE=20992
  696. AMI0NTa = 1,AMI0NT.sys , SIZE=20992
  697. aha154x  = 2,aha154x.sys , SIZE=25600
  698. aha154xa = 2,aha154x.sys , SIZE=25600
  699. buslogic = 2,buslogic.sys , SIZE=25088
  700. buslgica = 2,buslogic.sys , SIZE=25088
  701.